
package backend.bootstrap;

import backend.core.settings.SecureSettings;
import backend.core.settings.Settings;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.spi.BooleanOptionHandler;
import org.kohsuke.args4j.spi.StringArrayOptionHandler;

import java.nio.file.Path;
import java.util.List;

@ToString
@Getter
@Setter
public class ServerArgs {
    /**
     * Arguments for running Elasticsearch.
     *
     * @param daemonize {@code true} if Elasticsearch should run as a daemon process, or {@code false} otherwise
     * @param quiet {@code false} if Elasticsearch should print log output to the console, {@code true} otherwise
     * @param pidFile absolute path to a file Elasticsearch should write its process id to, or {@code null} if no pid file should be written
     * @param secrets the provided secure settings implementation
     * @param nodeSettings the node settings read from {@code elasticsearch.yml}, the cli and the process environment
     * @param configDir the directory where {@code elasticsearch.yml} and other config exists
     * @param logsDir the directory where log files should be written
     */

    private boolean daemonize;
    private boolean quiet;
    private Path pidFile;
    private SecureSettings secrets;
    private Settings nodeSettings;
    private Path configDir;
    private Path logsDir;

    public SecureSettings secrets() {
        return secrets;
    }

    public Path configDir() {
        return configDir;
    }

    public Settings nodeSettings() {
        return nodeSettings;
    }

    public Path pidFile() {
        return pidFile;
    }
}
